import request from '@/utils/request'

// 学院列表
export function getAcademyList(query) {
  return request({
    url: 'api/v1/sys-colleges',
    method: 'get',
    params: query
  })
}

// 新增学院
export function addAcademy(data) {
  return request({
    url: 'api/v1/sys-colleges',
    method: 'post',
    data: data
  })
}

// 编辑学院
export function editAcademy(data) {
  return request({
    url: 'api/v1/sys-colleges',
    method: 'PUT',
    data: data
  })
}

// 删除学院
export function delAcademy(data) {
  return request({
    url: 'api/v1/sys-colleges',
    method: 'delete',
    data: data
  })
}

// 获取教学点列表
export function getSchoolList(query) {
  return request({
    url: 'api/v1/sys-teaching-point/list',
    method: 'get',
    params: query
  })
}

// 新增教学点
export function addSchool(data) {
  return request({
    url: 'api/v1/sys-teaching-point/addPoint',
    method: 'post',
    data: data
  })
}

// 删除教学点
export function deletePoint(data) {
  return request({
    url: 'api/v1/sys-teaching-point/deletePoint',
    method: 'delete',
    data: data
  })
}

// 获取教学点详情
export function getSchoolDetails(id) {
  return request({
    url: 'api/v1/sys-teaching-point/detail/' + id,
    method: 'get'
  })
}

// 编辑教学点
export function editSchool(data) {
  return request({
    url: 'api/v1/sys-teaching-point/updatePoint',
    method: 'POST',
    data: data
  })
}
